# list3=["张三","李四","王五","马六","吴七"]
# #①用户输入一个姓名，查询是否在列表中
# #②如果存在，输出它在列表中的位置
list3 = ["张三", "李四", "王五", "马六", "吴七"]

name_in = input('请输入姓名:')
temp = 0
for name in list3:
    temp += 1
    if name_in == name:
        print(name_in + '在第' + str(temp) + '个')
        temp = 0
        break
    else:
        continue
if temp != 0:
    print('没有' + name_in + '姓名')

print('————————————————————————————————————————————')
print('第二种')
try:
    print(name_in + '在第' + str(list3.index(name_in) + 1) + '个')
except ValueError:
    print('没有' + name_in + '姓名')
